import React from 'react'
import {HashRouter as HRouter, Route, Link, Switch} from 'react-router-dom'
import Main from "./Main";
import Topic from "../router1/Topic";
import About from "../router1/About";
import Info from "./Info";
import Home from './Home'
import noMatch from './noMatch'
export default class JustRouter extends React.Component{

    render(){
        return (
            <HRouter>
                <Home>
                    <Switch>
                        <Route  path="/main" render={()=>
                            <Main>
                                <Route path="/main/:mainId" component={Info}></Route>
                            </Main>
                        }>
                        </Route>
                        <Route path="/about" component={About}></Route>
                        <Route path="/topic" component={Topic}></Route>
                        <Route path="/main/c" component={Topic}></Route>
                        <Route component={noMatch}></Route>
                    </Switch>
                </Home>
            </HRouter>
        );
    }
}
